#import <3dreality_api.h>
#import "DebugMethods.h"

@implementation DebugMethodClass
+ initMenu
{
    id mainMenu;
    id matrix = [mainMenu=[NXApp mainMenu] itemList];
    int ro, co;
    id cell;    
    id menu;
    
    [matrix getNumRows:&ro numCols:&co];
    cell = [matrix cellAt:ro-1 :0];
    
    menu = [[Menu allocFromZone:[Menu menuZone]] initTitle:"Debug Menu"];
    [menu addItem:"Dump Shape Hierarchy" 
	    action:@selector(dbg_dumpShapeHierarchy:)
	    keyEquivalent:0];
    [menu addItem:"Dump World Hierarchy" 
	    action:@selector(dbg_dumpWorldHierarchy:)
	    keyEquivalent:0];
	    	    
    [mainMenu setSubmenu:menu forItem:cell];
    return self;
}
@end 
